home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 85 / CD-ROM 85 / CD-ROM 85.iso / aplic / 2sync / 2SyncSetup.exe / modules / fd / panel / scripts / DefineButton2_44 / BUTTONCONDACTION on(release).as next >
Encoding:
Text File  |  2002-03-20  |  1.7 KB  |  63 lines

  1. on(release){
  2.    set("_level40/sound/lib:sound","175");
  3.    call("_level40/sound/lib:play");
  4.    set("../:month",int(_name.substr("6","2")));
  5.    x = "1";
  6.    while("12" >= x)
  7.    {
  8.       if(x < "10")
  9.       {
  10.          myMonth = "0" add x;
  11.       }
  12.       else
  13.       {
  14.          myMonth = x;
  15.       }
  16.       tellTarget("../month" add myMonth)
  17.       {
  18.          setProperty("selectedMonth", _visible, "0");
  19.       }
  20.       tellTarget("../month" add myMonth add "/colourlabel")
  21.       {
  22.          gotoAndStop("black");
  23.       }
  24.       x += "1";
  25.    }
  26.    setProperty("selectedMonth", _visible, "1");
  27.    tellTarget("colourlabel")
  28.    {
  29.       gotoAndStop(eval("_level0/data:labelcolour"));
  30.    }
  31.    myMonth = _name.substr("6","2");
  32.    if(getProperty("../", _name).substr("9","5") eq "start" and eval("../:year") >= eval("../../:endyear"))
  33.    {
  34.       set("../:year",eval("../../:endyear"));
  35.       if(int(eval("../../:endMonth")) < int(eval("../:month")))
  36.       {
  37.          myMonth = eval("../../:endMonth");
  38.       }
  39.       else
  40.       {
  41.          myMonth = _name.substr("6","2");
  42.       }
  43.    }
  44.    else if(getProperty("../", _name).substr("9","5") eq "end" and eval("../../:startyear") >= eval("../:year"))
  45.    {
  46.       set("../:year",eval("../../:startyear"));
  47.       if(eval("../:month") < eval("../../:startMonth"))
  48.       {
  49.          myMonth = eval("../../:startMonth");
  50.       }
  51.       else
  52.       {
  53.          myMonth = _name.substr("6","2");
  54.       }
  55.    }
  56.    set("../../:" add getProperty("../", _name).substr("9","5") add "month",myMonth);
  57.    set("../../:" add getProperty("../", _name).substr("9","5") add "year",eval("../:year"));
  58.    tellTarget("../")
  59.    {
  60.       gotoAndStop("hide");
  61.    }
  62. }
  63.